package com.lsc.record.core.entity;

import java.io.InputStream;

import com.lsc.record.core.listener.BaseEntityInsertListener;
import com.lsc.record.core.listener.BaseEntityUpdateListener;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.RelationOneToOne;
import com.mybatisflex.annotation.Table;

@Table(value="dm_content",onInsert = BaseEntityInsertListener.class,onUpdate = BaseEntityUpdateListener.class)
public class DmContent extends BaseEntity{
	
	private String docId;
	
	private String contentType;
	
	@Column("content_primary_version")
	private Integer contentPrimaryVersion;
	
	@Column("content_sub_version")
	private Integer contentSubVersion;
	
	@Column(ignore = true)
	private String contentVersion;
	
	private String filePath;
	
	private String formatName;
	
	private String storeId;
	
	@Column(ignore = true)
	@RelationOneToOne(selfField = "storeId",targetField = "id")
	private DmStore store;
	
	@Column(ignore = true)
	private InputStream inputStream;
	
	public String getContentVersion() {
		return contentVersion;
	}

	public void setContentVersion(String contentVersion) {
		this.contentVersion = contentVersion;
	}

	public String getDocId() {
		return docId;
	}

	public void setDocId(String docId) {
		this.docId = docId;
	}

	public String getFilePath() {
		return filePath;
	}

	public void setFilePath(String filePath) {
		this.filePath = filePath;
	}

	public String getFormatName() {
		return formatName;
	}

	public void setFormatName(String formatName) {
		this.formatName = formatName;
	}

	public String getStoreId() {
		return storeId;
	}

	public void setStoreId(String storeId) {
		this.storeId = storeId;
	}

	public DmStore getStore() {
		return store;
	}

	public void setStore(DmStore store) {
		this.store = store;
	}

	public String getContentType() {
		return contentType;
	}

	public void setContentType(String contentType) {
		this.contentType = contentType;
	}

	public Integer getContentPrimaryVersion() {
		return contentPrimaryVersion==null?1:contentPrimaryVersion;
	}

	public void setContentPrimaryVersion(Integer contentPrimaryVersion) {
		this.contentPrimaryVersion = contentPrimaryVersion;
	}

	public Integer getContentSubVersion() {
		return contentSubVersion==null?0:contentSubVersion;
	}

	public void setContentSubVersion(Integer contentSubVersion) {
		this.contentSubVersion = contentSubVersion;
	}

	public InputStream getInputStream() {
		return inputStream;
	}

	public void setInputStream(InputStream inputStream) {
		this.inputStream = inputStream;
	}
	
	
}
